Skip to content

lru: Stop mixed iteration when cursors meet - #1121

Open
astunm wants to merge 1 commit into
cloudflare:mainfrom
astunm:fix/lru-iterator-crossing
Open

astunm wants to merge 1 commit into
cloudflare:mainfrom
astunm:fix/lru-iterator-crossing

Conversation

@astunm

@astunm astunm commented Nov 11, 2026

Copy link
Copy Markdown

Stop linked-list iteration when the front and back cursors meet, so mixed next/next_back calls do not revisit entries or underflow the remaining length. Adds regressions for both exhaustion directions.

Both regressions fail before the fix. All 76 crate tests, crate checks, strict Clippy, doctests and formatting pass afterward on Rust 1.97.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant